#ifndef __CE_GFX_PROJECTOR_H__
#define __CE_GFX_PROJECTOR_H__

#include <export.h>
#include <math/matrix.h>

/**
 * \addtogroup graphics
 * @{
 */

/**
 * @brief Handling of the perspective projection
 */
class CE_API ceProjector
{
private:
  float _left;
  float _right;

  float _bottom;
  float _top;

  float _near;
  float _far;

  bool _perspective;
  ceMatrix4f _matrix;
public:
  ceProjector();

  void SetPerspective (bool perspective = true);
  void SetOrtho (bool ortho = true);

  ceVector3f Get (float x, float y) const;

  void SetOrtho2D(unsigned width, unsigned height);

  void FinishTransformation ();
  const ceMatrix4f& GetMatrix () const;

  void SetLeft (float left);
  float GetLeft () const;

  void SetRight (float right);
  float GetRight () const;

  void SetBottom (float bottom);
  float GetBottom () const;

  void SetTop (float top);
  float GetTop () const;

  void SetNear (float near);
  float GetNear () const;

  void SetFar(float far);
  float GetFar () const;

  float GetSphereRadius (float distance, bool min) const;
};

/** @} */

#endif /* ! __CE_GFX_PROJECTOR_H__ */
